import requests
import random
import hashlib
import time


time_stamp = int(time.time())
print(time_stamp)
headers= {
    "accept": "*/*",
    "accept-encoding": "gzip, deflate, zstd",
    "accept-language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7",
    "cache-control": "no-cache",
    "cookie": "buvid3=BF196E8C-ADE6-3443-4AB5-366325AE652E31186infoc; b_nut=1761790031; _uuid=E1FFF43C-DAEC-85A7-5DA6-3E51BA6849F632160infoc; buvid_fp=e6eddfc260a2e27698d073781f4c64a8; enable_web_push=DISABLE; buvid4=D65FA034-07F3-4E59-67EB-3F372B3BA4D532726-025103010-khW0S6wuJjDSDJK0c+0DAE6T9e6VnLfx/FrnG5q3BGaWolPEwRIU0S6T7/Oyn16J; CURRENT_FNVAL=2000; home_feed_column=4; browser_resolution=291-730; b_lsid=E6C3346B_19A521712B8; LIVE_BUVID=AUTO1817623138360278; bili_ticket=eyJhbGciOiJIUzI1NiIsImtpZCI6InMwMyIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NjI1NzMwMzYsImlhdCI6MTc2MjMxMzc3NiwicGx0IjotMX0.llqUQCN2SM2FuCp6sLkqyrk4U_xiohHAl2u4Dk_i6UE; bili_ticket_expires=1762572976; PVID=2",
    "origin": "https://live.bilibili.com",
    "pragma": "no-cache",
    "priority": "u=1, i",
    "referer": "https://live.bilibili.com/",
    "sec-ch-ua": "\"Chromium\";v=\"142\", \"Google Chrome\";v=\"142\", \"Not_A Brand\";v=\"99\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-site",
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36"
}
url = f'https://api.live.bilibili.com/xlive/web-interface/v1/index/getList?platform=web&web_location=444.7&w_rid=e028464dd3625e76206a649c5ba04f90&wts={time_stamp}'
res = requests.get(url,headers)
print(res.status_code)



